import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import Users from '../components/system/Users.vue'
import Welcome from '../components/Welcome'
import Roles from '../components/system/Roles'
import InRepe from '../components/supplies/InRepe'
import OutRepe from '../components/supplies/OutRepe'
import EnCode from '../components/supplies/EnCode'
import Subarea from '../components/supplies/Subarea'
import Container from '../components/supplies/Container'
import Check from '../components/supplies/Check'
import purchase from '../components/material/purchase'
import donation from '../components/material/donaction'
import scrap from '../components/material/scrap'
import Allocation from '../components/Allocation/Allocation'
import Flow from '../components/Allocation/Flow'
import Alarm from '../components/message/Alarm'
import Announcement from '../components/message/Announcement'
import Approve from '../components/message/Approve'
import Urge from '../components/message/Urge'
import Depart from '../components/Department/Depart'
import Log from '../components/LoginLog/Log'
import LoginLog from '../components/LoginLog/LoginLog'
import Login from '../components/Login'
import AddStocks from '../components/supplies/AddStocks'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/Home',
    name: 'Home',
    component: Home,
    redirect: '/welcome',
    children: [
      // 侯博
      { path: '/welcome', name: 'Welcome', component: Welcome },
      { path: '/users', name: 'Users', component: Users },
      { path: '/roles', name: 'Roles', component: Roles },
      { path: '/InRepe', name: 'InRepe', component: InRepe },
      { path: '/inRepe/addStocks', name: 'AddStocks', component: AddStocks },
      { path: '/OutRepe', name: 'OutRepe', component: OutRepe },
      { path: '/Subarea', name: 'Subarea', component: Subarea },
      { path: '/Container', name: 'Container', component: Container },
      { path: '/EnCode', name: 'EnCode', component: EnCode },
      { path: '/Check', name: 'Check', component: Check },
      // 王鑫
      { path: '/purchase', name: 'purchase', component: purchase },
      { path: '/scrap', name: 'scrap', component: scrap },
      { path: '/donation', name: 'donation', component: donation },
      // 刘伟超
      { path: '/allocation', name: 'Allocation', component: Allocation },
      { path: '/flow', name: 'Flow', component: Flow },
      { path: '/alarm', name: 'Alarm', component: Alarm },
      { path: '/announcement', name: 'Announcement', component: Announcement },
      { path: '/approve', name: 'Approve', component: Approve },
      { path: '/urge', name: 'Urge', component: Urge },
      // 陆宇龙
      { path: '/department', name: 'department', component: Depart },
      { path: '/log', name: 'log', component: Log },
      { path: '/LoginLog', name: 'LoginLog', component: LoginLog }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
